package test2;

public class Student {
    public String name;
    public int age;
    public int sn;
    public String cla;

    public Student(String name, int age, int sn, String cla) {
        this.name = name;
        this.age = age;
        this.sn = sn;
        this.cla = cla;
    }

    public Student() {}

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSn() {
        return sn;
    }

    public void setSn(int sn) {
        this.sn = sn;
    }

    public String getCla() {
        return cla;
    }

    public void setCla(String cla) {
        this.cla = cla;
    }

    public void study() {
        System.out.println(this.name + "学习");
    }

    public void exam() {
        System.out.println(this.name + "考试");
    }

    public void doHomework() {
        System.out.println(this.name + "做作业");
    }
}

class Test {
    public static void main(String[] args) {
        Student s1 = new Student("张三",18,2316,"1班");
        s1.study();
        s1.exam();
        s1.doHomework();

        Student s2 = new Student();
        s2.setName("李四");
        s2.setAge(21);
        s2.setSn(1234);
        s2.setCla("2班");
        s2.study();
        s2.exam();
        s2.doHomework();
    }
}